import java.io.File;
import java.sql.Connection;

public class Connect {
	public static void main(String[] args) {
		String stringDir = "D:\\baraholka\\pefl_bd_beta";
		File dir = new File(stringDir);
		for (String fileName:dir.list()){
			System.out.println(fileName);
		String result = PlayerReader
				.readFile(stringDir+"/"+fileName);

		PlayerParser pp = new PlayerParser(result);
		Player player = pp.parse();
		System.out.println(player.print());
		
		 Connection conn = DBConnector.connect();
		 DBConnector.insertPlayer(player, conn);
		 DBConnector.disconnect(conn);
		}
		
	}

}